<!doctype html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<html>
<head>
    <%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    %>
    <%@ include file="/WEB-INF/views-jsp/include/taglib/taglib.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/meta/meta.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/link/link.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/script/script.jsp" %>
    <script type="text/javascript" src="${path}/html/js/js-jsp/pr/project/projectOption.js?v=<%out.print(Math.random());%>"></script>
    <script type="text/javascript" src="${path}/html/js/js-jsp/common/select-plugin.js"></script>
    <script type="text/javascript" src="${path}/html/js/js-jsp/common.js"></script>
</head>
<body>
<div class="place">
    <span>当前位置：</span>
    <ul class="placeul">
        <li><a href="${path}/project/index.do" style="background: transparent; border: none">项目管理</a></li>
        <c:if test="${project.prId == null}">
            <li><a style="background: transparent; border: none">添加项目</a></li>
        </c:if>
        <c:if test="${project.prId != null}">
            <li><a style="background: transparent; border: none">修改项目</a></li>
        </c:if>
    </ul>
</div>
<form id="operate_form" class="form" method="post" action="#">
    <div class="formbody">
        <div class="formtitle"><span>基本信息</span></div>
        <table id="projectDesc" align="center" border="0" width="100%">
            <c:if test="${project.prId == null}">
                <input type="hidden"  name="prCode" id="prCode" value="${prCode}" style="width:255px; height: 30px" />
            </c:if>
            <c:if test="${project.prId != null}">
                <input type="hidden"  name="prCode" id="prCode" value="${project.prCode}" style="width:255px; height: 30px" />
            </c:if>
            <tr><input type="hidden" name="prId" id="prId" value="${project.prId}" /></tr>
            <tr>
                <td align="right">项目名称：</td>
                <td align="left"><input class="easyui-textbox" name="prName" id="prName" value="${project.prName}"
                                        style="width:255px; height: 30px" data-options="required:true,validType:'length[1,18]', prompt:'请输入项目名称'" missingMessage="项目名称不能为空"   /></td>
                <td align="right">所属公司：</td>
                <td align="left">
                    <input id="companyTree" class="easyui-combotree" editable="false" style="width:255px; height: 30px" data-options="required:true, prompt:'请选择所属公司'" missingMessage="所属公司不能为空" />
                    <input type="hidden" id="companyId" name="companyId" value="${project==null?DefaulCompany:project.companyId}"/>
                    <input type="hidden" name="officeCode" value="${project.office.officeCode}"/>
                </td>
            </tr>
            <tr>
                <td align="right">所属项目部：</td>
                <td align="left">
                    <input id="officeTree"  class="easyui-combotree" editable="false"  style="width:255px; height: 30px"  data-options="required:true, prompt:'请选择所属项目部'" missingMessage="所属项目部不能为空" />
                    <input type="hidden" id="parentId" name="parentId" value="${project.office.parentId}"/>
                    <input type="hidden" id="officeId" name="officeId" value="${project.office.officeId}"/>
                </td>
                <td align="right">项目标段：</td>
                <td align="left"><input class="easyui-textbox" name="prLocal" id="prLocal"
                                        style="width:255px; height: 30px" value="${project.prLocal}" data-options="validType:'length[1,18]',prompt:'请输入项目标段'"></td>
            </tr>
            <tr>
                <td align="right">项目负责人：</td>
                <td align="left"><input class="easyui-textbox" name="prLeader" id="prLeader"
                                        style="width:255px; height: 30px" value="${project.prLeader}"  data-options="validType:'length[1,5]',prompt:'请输入项目负责人'"/></td>
                <td align="right">负责人电话：</td>
                <td align="left"><input class="easyui-textbox" name="prLeaderPhone" id="prLeaderPhone" style="width:255px; height: 30px" validType="mobile"  value="${project.prLeaderPhone}"  data-options="prompt:'请输入项目负责人电话'"/>
                </td>
            </tr>
            <tr>
                <td align="right">项目经理：</td>
                <td align="left"><input class="easyui-textbox" name="unitOperator.uoMgr" onchange="valil()" id="unitOperatorUoMgr" data-options="validType:'length[1,18]',prompt:'请输入项目经理名称'"
                                        style="width:255px; height: 30px" value="${project.unitOperator .uoMgr}"/></td>
                <td align="right">项目总投资：</td>
                <td align="left"><input class="easyui-numberbox" data-options="min:0,precision:2,max:100000000,prompt:'请输入项目总投资'" validtype="moneyValidator" name="prInvest" id="prInvest"
                                        style="width:255px; height: 30px" value="${project.prInvest}"/></td>
                </td>
            </tr>
            <tr>
                <td align="right">建设性质：</td>
                <td align="left"><select class="select-commonDict easyui-combobox" data-modelCode="PR" data-funCode="constructType"
                                         name="constructType" data-options="prompt:'请输入建设性质'"
                                         id="constructType" style="width:255px; height: 32px"  defualt-value="${project.constructType.cdId}" validType="selectNotEmpty['建设性质']"  editable="false"></select></td>
                <td align="right">项目类型：</td>
                <td align="left"><select class="select-commonDict easyui-combobox" data-modelCode="PR" data-funCode="prType"
                                         data-cascade="prPurpose" defualt-value="${project.prType.cdId}"
                                         name="prType" id="prType" style="width:255px; height: 32px" validType="selectNotEmpty['项目类型']"  editable="false" >
                </select></td>
            </tr>
            <tr>
                <td align="right">工程用途：</td>
                <td align="left"><select class="select-commonDict easyui-combobox" data-modelCode="PR" data-funCode="prPurpose"
                                         name="prPurpose"   defualt-value="${project.prPurpose.cdId}"
                                         id="prPurpose" style="width:255px; height: 32px" validType="selectNotEmpty['工程用途']" prompt="--请选择--"  editable="false">
                </select></td>
                <td align="right">项目绑定：</td>
                <td align="left">
                    <select class="easyui-combobox" name="prBind" style="width:255px; height: 30px" value="${project.prBind}" editable="false">
                        <option value="1" selected="selected">未绑定</option>
                        <option value="2">已绑定</option>
                    </select>
                </td>
            </tr>
            <tr>

                <td align="right">项目造价(万元)：</td>
                <td align="left"><input class="easyui-numberbox" data-options="min:0,precision:2,max:100000000,prompt:'请输入项目造价'" validtype="moneyValidator"  name="prCost" id="prCost" style="width:255px; height: 30px" value="${project.prCost}"/>
                <td align="right">项目总面积(m²)：</td>
                <td align="left"><input class="easyui-numberbox" data-options="min:0,precision:2,max:100000000,prompt:'请输入项目总面积'" validtype="floatOrInt" name="prArea" id="prArea" value="${project.prArea}"
                                        style="width:255px; height: 30px"/></td>
            </tr>
            <tr>
                <td align="right">安检备案号：</td>
                <td align="left">
                    <input class="easyui-textbox" name="prBackNum" id="prBackNum" style="width:255px; height: 30px"  value="${project.prBackNum}" data-options=" validType:'length[1,18]',prompt:'请输入项目安检备案号'"/>
                </td>
                <td align="right">项目所属地：</td>
                <td align="left">
                    <input  class="select-region" name="prProvice" set-cityId="prCity" set-districtId="prDistrict" id="prProvice" style="width:84px; height: 32px" editable="false" defualt-value="${project.prProvice.regionId}" value="${project.prProvice.regionId}" >
                    </input>
                    <input class="easyui-combobox" name="prCity" id="prCity" style="width:84px; height: 32px" editable="false"  value="${project.prCity.regionId}" >
                    </input>
                    <input class="easyui-combobox" name="prDistrict" id="prDistrict" value="${project.prDistrict.regionId}"
                            style="width:84px; height: 32px" editable="false"/>
                   </td>
            </tr>
            <tr>
                <td align="right">项目经度：</td>
                <td align="left"><input class="easyui-numberbox" data-options="min:-180,precision:4,max:180,prompt:'请输入项目经度'" validType="longitude"  name="prLongitude" id="prLongitude"
                style="width:255px; height: 30px" value="${project.prLongitude}"/></td>
                <td align="right">项目地址：</td>
                <td align="left"><input class="easyui-textbox" name="prAddres" id="prAddres"
                                        style="width:255px; height: 30px" value="${project.prBackNum}"  data-options="validType:'length[1,18]',prompt:'请输入项目地址'"/></td>
            </tr>
            <tr>
                <td align="right">项目纬度：</td>
                <td align="left"><input class="easyui-numberbox" data-options="min:-90,precision:4,max:90,prompt:'请输入项目纬度'"  name="prLatitude" id="prLatitude"
                                        style="width:255px; height: 30px" value="${project.prLatitude}" validType="latitude"/></td>
                <td align="right">立项文号：</td>
                <td align="left"><input class="easyui-textbox" name="prApprovalDocNum" id="prApprovalDocNum" data-options="validType:'length[1,18]',prompt:'请输入立项文号'"
                                        style="width:255px; height: 30px"  value="${project.prApprovalDocNum}"/></td>
            </tr>
            <tr>
                <td align="right">立项级别：</td>
                <td align="left"><select class="select-commonDict easyui-combobox" data-modelCode="PR" data-funCode="prApprovalLevel"
                                         name="prApprovalLevel" id="prApprovalLevel" defualt-value="${project.prApprovalLevel.cdId}"
                                         style="width:255px; height: 32px" editable="false"></select></td>
                <td align="right">建设用地规划许可证编号：</td>
                <td align="left"><input class="easyui-textbox" name="landPlanCertNum" id="landPlanCertNum" data-options="validType:'length[1,18]',prompt:'请输入建设用地规划许可证编号'"
                                        style="width:255px; height: 30px"  value="${project.landPlanCertNum}"/></td>
            </tr>
            <tr>
                <td align="right">建设工程规划许可证编号：</td>
                <td align="left"><input class="easyui-textbox" name="prPlanCertNum" id="prPlanCertNum" data-options="validType:'length[1,18]',prompt:'请输入建设工程规划许可证编号'"
                                        style="width:255px; height: 30px" value="${project.prPlanCertNum}"/></td>
                <td align="right">中标通知书编号：</td>
                <td align="left"><input class="easyui-textbox" name="zxglNum" id="zxglNum" data-options="validType:'length[1,18]',prompt:'请输入中标通知书编号'"
                                        style="width:255px; height: 30px"  value="${project.zxglNum}"/></td>
            </tr>
            <tr>
                <td align="right">施工图审查合格书编号：</td>
                <td align="left"><input class="easyui-textbox" name="drawingCertCode" id="drawingCertCode" data-options="validType:'length[1,18]',prompt:'请输入施工图审查合格书编号'"
                                        style="width:255px; height: 30px"   value="${project.drawingCertCode}"/></td>
                <td align="right">施工许可证编号：</td>
                <td align="left"><input class="easyui-textbox" name="buildLicenceCode" id="buildLicenceCode" data-options="validType:'length[1,18]',prompt:'请输入施工许可证编号'"
                                        style="width:255px; height: 30px"  value="${project.buildLicenceCode}"/></td>
            </tr>
            <tr>
                <td align="right">招标代理机构名称：</td>
                <td align="left"><input class="easyui-textbox" name="bidAgencyName" id="bidAgencyName" data-options="validType:'length[1,18]',prompt:'请输入招标代理机构名称'"
                                        style="width:255px; height: 30px" value="${project.bidAgencyName}"/></td>
                <td align="right">招标代理机构组织机构代码：</td>
                <td align="left"><input class="easyui-textbox" name="bidAgencyCode" id="bidAgencyCode" data-options="validType:'length[1,18]',prompt:'请输入招标代理机构组织机构代码'"
                                        style="width:255px; height: 30px"  value="${project.bidAgencyCode}"/></td>
            </tr>
            <tr>
                <td align="right">施工图审查机构名称：</td>
                <td align="left"><input class="easyui-textbox" name="drawingOrgName" id="drawingOrgName" data-options="validType:'length[1,18]',prompt:'请输入施工图审查机构名称'"
                                        style="width:255px; height: 30px" value="${project.drawingOrgName}"/></td>
                <td align="right">施工图审查机构组织机构代码：</td>
                <td align="left"><input class="easyui-textbox" name="drawingOrgCode" id="drawingOrgCode" data-options="validType:'length[1,18]',prompt:'请输入施工图审查机构组织机构代码'"
                                        style="width:255px; height: 30px"  value="${project.drawingOrgCode}"/></td>
            </tr>
            <tr>
                <td align="right">竣工验收备案编号：</td>
                <td align="left"><input class="easyui-textbox" name="referenceCode" id="referenceCode" data-options="validType:'length[1,18]',prompt:'请输入竣工验收备案编号'"
                                        style="width:255px; height: 30px"  value="${project.referenceCode}"/></td>
                <td align="right">实际面积(m²)：</td>
                <td align="left"><input class="easyui-numberbox" data-options="min:0,precision:2,max:100000000,prompt:'请输入项目总面积'" validtype="floatOrInt" name="proRealArea" id="proRealArea"
                                        style="width:255px; height: 30px" value="${project.proRealArea}"/></td>
            </tr>
             <tr>
                <td align="right">计划施工开始日期：</td>
                <td align="left">
                        <input id="prStart"  style="width:255px; height: 32px"	class="easyui-datebox" name="prStart" data-options="prompt:'请选择开始日期',editable:false,required:'true',onSelect:onSelect" value="<fmt:formatDate value="${project.prStart}" pattern="yyyy-MM-dd"/>" missingMessage="计划开始时间不能为空">
                </td>
                 <td align="right">计划施工结束日期：</td>
                 <td align="left">
                     <input id="prEnd" style="width:255px; height: 32px"	class="easyui-datebox" name="prEnd"   data-options="prompt:'请选择结束日期',editable:false,required:'true',validType:'equaldDate[\'#prStart\']'" value="<fmt:formatDate value="${project.prEnd}" pattern="yyyy-MM-dd"/>" missingMessage="计划结束时间不能为空" >
                 </td>
             </tr>
            <tr>
                 <td align="right">实际施工开始日期：</td>
                 <td align="left">
                         <input id="prRealStart"  style="width:255px; height: 32px"	class="easyui-datebox" name="prRealStart" data-options="prompt:'请选择开始日期',editable:false,required:'true',onSelect:onSelectReal" value="<fmt:formatDate value="${project.prRealStart}" pattern="yyyy-MM-dd"/>" missingMessage="实际开始时间不能为空">
                 </td>
                 <td align="right">实际施工结束日期：</td>
                 <td align="left">
                         <input id="prRealEnd" style="width:255px; height: 32px"	class="easyui-datebox" name="prRealEnd"   data-options="prompt:'请选择结束日期',editable:false,validType:'equaldDate[\'#prRealStart\']'" value="<fmt:formatDate value="${project.prRealEnd}" pattern="yyyy-MM-dd"/>">
                 </td>
             </tr>
            <tr>
                <td align="right">招标方式：</td>
                <td align="left">
                    <select class="select-commonDict easyui-combobox" data-modelCode="PR" data-funCode="bidType"
                                         name="bidType" id="bidType" defualt-value="${project.bidType.cdId}"
                                         style="width:255px; height: 32px" editable="false" ></select>
                </td>
                <td align="right">勘察单位：</td>
                <td align="left">
                    <input type="hidden" id="unitInvestigateName" name="unitInvestigate.unitName"  value="">
                    <select class="easyui-combobox" editable="false" name="unitInvestigate.uId" id="unitInvestigate" style="width:255px; height: 32px">
                        <option value=""  ${project.unitInvestigate.uId==null ? 'selected="selected"': ''}>--请选择--</option>
                        <c:forEach var="unit" items="${KCDW}">
                            <option value="${unit.uId}" ${project.unitInvestigate.uId==unit.uId ? 'selected="selected"': ''}>${unit.unitName}</option>
                        </c:forEach>
                    </select>
                </td>
            </tr>
            <tr>
                <td align="right">设计单位：</td>
                <td align="left">
                    <input type="hidden" id="unitDesignName" name="unitDesign.unitName"  value="">
                    <select class="easyui-combobox" editable="false" name="unitDesign.uId" id="unitDesign" style="width:255px; height: 32px">
                        <option value=""  ${project.unitDesign.uId==null ? 'selected="selected"': ''}>--请选择--</option>
                        <c:forEach var="unit" items="${SJDW}">
                            <option value="${unit.uId}"  ${project.unitDesign.uId==unit.uId ? 'selected="selected"': ''}>${unit.unitName}</option>
                        </c:forEach>
                    </select>
                </td>
                <td align="right">监测单位：</td>
                <td align="left">
                    <input type="hidden" id="unitCheckName" name="unitCheck.unitName"  value="">
                    <select class="easyui-combobox" editable="false" name="unitCheck.uId" id="unitCheck" style="width:255px; height: 32px">
                        <option value=""  ${project.unitCheck.uId==null ? 'selected="selected"': ''}>--请选择--</option>
                        <c:forEach var="unit" items="${JCDW}">
                            <option value="${unit.uId}" ${project.unitCheck.uId==unit.uId ? 'selected="selected"': ''}>${unit.unitName}</option>
                        </c:forEach>
                    </select>
                </td>
            </tr>
            <tr>
                <td align="right">建设单位：</td>
                <td align="left">
                    <input type="hidden" id="unitBuildName" name="unitBuild.unitName"  value="">
                    <select class="easyui-combobox" editable="false" name="unitBuild.uId" id="unitBuild" style="width:255px; height: 32px">
                        <option value=""  ${project.unitBuild.uId==null ? 'selected="selected"': ''}>--请选择--</option>
                        <c:forEach var="unit" items="${JSDW}">
                            <option value="${unit.uId}" ${project.unitBuild.uId==unit.uId ? 'selected="selected"': ''}>${unit.unitName}</option>
                        </c:forEach>
                    </select>
                </td>
                <td align="right">施工单位：</td>
                <td align="left">
                    <input type="hidden" id="unitOperatorName" name="unitOperator.unitName"  value="">
                    <select class="easyui-combobox" editable="false" name="unitOperator.uId" validType="" onchange="" id="unitOperator" style="width:255px; height: 32px">
                        <option value=""  ${project.unitOperator.uId==null ? 'selected="selected"': ''}>--请选择--</option>
                        <c:forEach var="unit" items="${SGDW}">
                            <option value="${unit.uId}" ${project.unitOperator.uId==unit.uId ? 'selected="selected"': ''}>${unit.unitName}</option>
                        </c:forEach>
                    </select>
                </td>
            </tr>
            <tr>
                <td align="right">监理单位：</td>
                <td align="left">
                    <input type="hidden" id="unitSupervisorName" name="unitSupervisor.unitName"  value="">
                    <select class="easyui-combobox" editable="false"  name="unitSupervisor.uId" id="unitSupervisor" style="width:255px; height: 32px">
                        <option value=""  ${project.unitSupervisor.uId==null ? 'selected="selected"': ''}>--请选择--</option>
                        <c:forEach var="unit" items="${JLDW}">
                            <option value="${unit.uId}" ${project.unitSupervisor.uId==unit.uId ? 'selected="selected"': ''}>${unit.unitName}</option>
                        </c:forEach>
                    </select>
            </tr>
            <tr>
                <td align="right" valign="top" style="padding-top: 10px">建设规模描述：</td>
                <td align="left" valign="top" style="padding-top: 5px">
                    <input class="easyui-textbox" name="constructScale" id="constructScale" style="width:255px; height: 100px" data-options="validType:'length[1,30]',multiline:true,prompt:'请输入建设规模描述'" value="${project.constructScale}"/>
                </td>
                <td align="right" valign="top" style="padding-top: 10px">项目概述：</td>
                <td align="left" valign="top" style="padding-top: 5px">
                    <input class="easyui-textbox" name="prRemark" id="prRemark" style="width:255px; height: 100px" data-options="validType:'length[1,30]',multiline:true,prompt:'请输入项目概述'" value="${project.prRemark}"/>
                </td>
            </tr>
            <tr align="center">
                <td colspan="4">
                    <div>
                        <a id="optionProject" class="easyui-linkbutton c1" style="width:120px; height: 35px">保存</a>
                        &nbsp;&nbsp;&nbsp;
                        <a href="${path}/project/index.do" class="easyui-linkbutton c1" style="width:120px; height: 35px">取消</a>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</form>
</body>
</html>